package com.diandian.common;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;


/**
 * @description Constant
 * @author TDW
 * @date 2016年12月29日
 *
 */
@ConfigurationProperties(prefix="sys_proj" ,locations="classpath:shop.yml")
public class Constant {
	
	
	/** 统一消息返回编码 key */
	public static final String RETURN_CODE = "ret_code";
	
	/** 统一消息返回 content */
	public static final String RETURN_MESSAGE = "ret_msg";
	
	/** 系统异常编码  系统保留  */
	public static final String SYS_ERR_CODE = "99999";
	
	/** 系统异常 */
	public static final String SYS_ERR_MSG = "system err !";
	
	/** 灰度商家列表 */
	public static List<String> grayshops = new ArrayList<String>();

	/** 打印机下发置终端  */
	public static final String URL_PRINTER_SYNC = "shop_printer_mgr/sync2Agent";
	
	/** 订单重发 */
	public static final String URL_ORDER_REPRINTER = "shopinfo/rePrint";
	
	/** APP订单重打*/
	public static final String URL_APP_ORDER_REPRINTER = "app/product/rePrint";
	
	/** 订单重打 */
    public static final String URL_REPRINT_ORDER = "ordermanage/rePrintOrder";

	/** 商家配置下发 */
	public static final String URL_SEND_SHOP_CONF = "shop_pay_conf/sendShopConf";
	
	/** 测试单下发 */
	public static final String URL_SEND_TEST_ORDER = "shop_printer_mgr/test";//测试单
	
	/** dd_mobile_server 订单重发， dd_platform发起*/
	public static final String URL_RESEND_ORDER = "/resendOrder";//dd_platform-->dd_mobile_server-->mq

	public static final String URL_SEND_RE_PRENT = "/sendRePrent";//dd_op-->dd_mobile_server-->mq

	
	/**==================各项目名在网关中的项目名, 见shop.yml 中sys_proj=======================**/
	/** dd_op */
	public static String op;
	
	/** dd_mobile */
	public static String mobile;
	
	/** dd_mobile_server */
	public static String mobileServer;
	
	/** dd_marketing */
	public static String marketing;
	
	/**=============================================================================**/
	
	
	
	
	public void setGrayshops(List<String> grayshops) {
		this.grayshops = grayshops;
	}
	
	public static void setOp(String op) {
		Constant.op = op;
	}
	
	public static void setMobile(String mobile) {
		Constant.mobile = mobile;
	}
	
	public static void setMobileServer(String mobileServer) {
		Constant.mobileServer = mobileServer;
	}
	
	public static void setMarketing(String marketing) {
		Constant.marketing = marketing;
	}
	
	
}
